<template>
  <div class="login">
    <div class="hao">
      <span class="span" @click="del">×</span>
      <!-- title的插槽 -->
      <slot name="p"></slot>
      <!-- input的插槽 -->
      <slot name="input"></slot>
      <button :class="input0 && input1 ? 'btn' : 'btn1'" :disabled="input0 && input1 ? false : true" @click="dl">登录</button>
      <div class="dl">
        <span class="dl-span" @click="to">验证码登录</span>
        <span>|</span>
        <span class="dl-span">登录遇到问题</span>
      </div>
      <div class="dl1">
        <span class="dl1-span"></span>
        <span>社交账号登录</span>
        <span class="dl1-span"></span>
      </div>
      <div class="xy">
        <span style="margin-right: -14px;">注册即代表同意</span>
        <span class="xy-span">《xxx社区协议》</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    input0: {
      type: String
    },
    input1: {
      type: String
    }
  },
  methods: {
    to() {
      this.$emit('to')
    },
    del() {
      this.$emit('del')
    },
    dl(){
      this.$emit('dl')
    }
  }
}
</script>

<style lang="scss" scoped>
$width: 100%;

.login {
  width: 92%;
  margin-left: 4%;

  .hao {
    .span {
      width: $width;
      height: 20px;
      float: left;
      font-size: 35px;
      font-weight: 400;
      margin-bottom: 100px;
    }

    .p {
      width: $width;
      text-align: center;
      font-size: 27px;
      margin-bottom: 40px;
    }

    .input {
      width: $width;
      display: flex;
      flex-direction: column;

      .input0 {
        display: flex;
        align-items: center;

        .input0-span {
          width: 50px;
          height: 22.4px;
          font-size: 15px;
          padding: 10px 0;
          margin-top: 10px;
          border-bottom: 1px solid #dee2e6;
        }
      }

      input {
        width: $width;
        outline: none;
        height: 22.4px;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid #dee2e6;
        margin-top: 10px;

        &::placeholder {
          color: #9c9b9b;
          font-size: 16px;
        }
      }

      .input1 {
        display: flex;
        align-items: flex-end;

        .input1-span {
          float: right;
          width: 74px;
          font-size: 16px;
          color: #6c757d;
          border-bottom: 1px solid #dee2e6;
        }

        .input1-button,
        .input1-button1 {
          width: 130px;
          height: 40px;
          background-color: #FF4A6A;
          color: #fff;
          border: 0;
          font-size: 12px;
        }

        // .input1-button1 {
        //   background-color: #F87F97
        // }
      }
    }

    .btn1,
    .btn {
      width: $width;
      background-color: #F87F97;
      border-radius: 25px;
      height: 46px;
      border: 0;
      color: #fcf9f9b1;
      font-size: 18px;
      margin-top: 30px;
    }

    .btn {
      background-color: #FF4A6A;
      color: #fff;
    }

    .dl {
      margin-top: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;

      .dl-span {
        color: #007bff;
        margin-left: 10px;
        margin-right: 10px;
      }

    }

    .dl1 {
      font-size: 14px;
      display: flex;
      color: #6c757d;
      align-items: center;
      justify-content: center;
      margin-top: 25px;

      .dl1-span {
        width: 50px;
        height: 0.5px;
        background-color: rgb(221, 221, 221);
      }
    }

    .xy {
      color: #6c757d;
      margin-top: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;

      .xy-span {
        color: #007bff;
        margin-left: 10px;
        margin-right: 10px;
      }
    }
  }
}
</style>
